package com.wly.ui.common
{
	import com.wly.ui.effect.ScoreEffect;
	
	import flash.display.Sprite;
	import flash.geom.Point;
	
	import gs.TweenMax;
	
	public class EffectLayer extends Sprite
	{
		static private var _instance:EffectLayer;
		
		public function EffectLayer()
		{
			super();
			mouseChildren = false;
			mouseEnabled  = false;
		}
		
		static public function getIntance():EffectLayer
		{
			if(!_instance)
			{
				_instance = new EffectLayer();
			}
			
			return _instance;
		}
		
		public function addScoreEffect(score:int, pos:Point):void
		{
			var scoreEffect:ScoreEffect = new ScoreEffect();
			scoreEffect.setScore(score);
			scoreEffect.x = pos.x;
			scoreEffect.y = pos.y;
			addChild(scoreEffect);
			scoreEffect.playEffect();
		}
	}
}